hysop.numerics.fft.opencl_fft module

OpenCl backend base interface for fast Fourier Transforms.

OpenClFFTI OpenClFFTPlanI OpenClFFTQueue

class hysop.numerics.fft.opencl_fft.OpenClFFTI(cl_env, backend=None, allocator=None, queue=None, **kwds)[source]

Bases: FFTI

Abstract base for FFT interfaces targetting OpenCL backends.

Initializes the interface and default supported real and complex types.

classmethod default_interface(cl_env, backend=None, allocator=None, warn_on_allocation=False, error_on_allocation=True, warn_on_unaligned_output_offset=True, **kwds)[source]

Get the default OpenCl FFT interface which is a GpyFFT interface.

classmethod ensure_buffer(get_buffer)[source]
new_queue(tg, name)[source]

Return a FFTQueue object valid with this backend.

plan_accumulate(tg, src, dst)[source]

Plan an accumulation from src into dst.

plan_compute_energy(tg, fshape, src, dst, transforms, mutexes, method='round', target=None)[source]

Plan to compute energy from src to energy.

plan_copy(tg, src, dst)[source]

Plan a copy from src to dst.

plan_fill_zeros(tg, a, slices)[source]

Plan to fill every input slices of input array a with zeroes.

plan_transpose(tg, src, dst, axes)[source]

Plan a transpose from src to dst using given axes.

class hysop.numerics.fft.opencl_fft.OpenClFFTPlanI(**kwds)[source]

Bases: FFTPlanI, OpenClKernelLauncherI

Tag for FFT plans executing on OpenCL backend arrays.

Create a OpenClKernelLauncher.

Parameters:
  • name (str) – A name for this kernel launcher (for logging purposes).

  • kwds (dict) – Base class arguments.

abstract execute(**kwds)[source]

Execute the FFT plan on current input and output array.

global_size_configured()[source]

Return True is this kernel is ready to be enqueued without specifying global_work_size (local_work_size is always optional).

class hysop.numerics.fft.opencl_fft.OpenClFFTQueue(queue, name='fft_planner')[source]

Bases: FFTQueueI

An opencl fft queue is just like a standard opencl queue.

execute(wait_for=None)[source]

Execute all planned plans.